//
//  PDDAuthTip.swift
//  LeGou
//
//  Created by 刘亿前 on 2022/10/20.
//

import UIKit

class PDDAuthTip: UIView {

    @IBOutlet weak var nextBtn: UIButton!
    let disposeBag = DisposeBag()
    var nextBlock: (()->())?
    
    public class func show(_ click: (()->())?) {
        let vc = ZMUtil.loadNibViewFullScreen(nibName: PDDAuthTip.self)
        vc.nextBlock = click
        APPWindow?.addSubview(vc)
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        nextBtn.rx.tap.subscribe(onNext:{ [unowned self] resp in
            self.removeFromSuperview()
            if let block = self.nextBlock {
                block()
            }
        }).disposed(by: disposeBag)
    }

}
